package compiler.tac;

import compiler.dot.GraphHelper;

public class EntryBlock extends BasicBlock {
	String name;
	
	public EntryBlock(String name) {
		super();
		this.name = name;
	}
	
	@Override
	public void printCFG(GraphHelper graph) {
		boolean fresh = graph.addNode(this, getName());
		
		if (fresh) {
			for (BasicBlock succ : successors) {
				succ.printCFG(graph);
				graph.addEdge(this, succ);
			}
		}
	}
	
	@Override
	public String getName() {
		return "Entry: "+name;
	}
}
